<!DOCTYPE html>
<html>
    <head>
        <title>
            工作记录
        </title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
        <link rel="stylesheet" href="__CSS__/index.css">
    </head>
    <body>        
        <div class="link">
            <p class="title">闪风猫日常工作记录123</p>
            <a href="{:U('work/setting')}">设置</a>
            <a href="{:U('work/log')}">我的工作记录</a>  
        </div>
        <hr>
        <form action="{:U('work/upload')}" enctype="multipart/form-data" method="post" onsubmit="return submit_before()">
            <label class="today">今日工作记录 {:date('m-d')} {:what_day()}</label>
            <div class="flex">
                上午
                <textarea placeholder="请填写今日上午记录，必填" id="am" name="am">{$data['am']}</textarea>
            </div>
            <div class="flex">
                下午
                <textarea placeholder="请填写今日下午记录，必填"  id="pm"  name="pm">{$data['pm']}</textarea>
            </div>
            <div class="flex">
                备注
                <textarea placeholder="备注信息，非必填"  id="ps"  name="ps">{$data['ps']}</textarea>
            </div>
            <div class="wran"><span>*</span> 一次忘记记录，罚款0.5元</div>
            <div class="btn">
                <button type="submit">提交</button>
            </div>
        </form>
    </body>
    <script  src="http://libs.baidu.com/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript">
        function submit_before() {
            if (confirm('每天{$out_hour}:00之后不可修改，请记住')) {
                if (!$('#am').val() || !$('#pm').val()) {
                    alert('请填写今日记录');
                    return false;
                }
                return true;
            }
            return false;
        }
    </script>
</html>
